package com.link2room.aeriabots.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/10/30
 */
@Entity
@Table(name = "wx_qrcode_scan_detail")
public class WxQrcodeScanDetailEntity extends BaseEntity{
    private String qrType;
    private String qrKey;
    private String openid;
    private String scanType;
    private String msgId;

    @Basic
    @Column(name = "qr_type")
    public String getQrType() {
        return qrType;
    }

    public void setQrType(String qrType) {
        this.qrType = qrType;
    }

    @Basic
    @Column(name = "qr_key")
    public String getQrKey() {
        return qrKey;
    }

    public void setQrKey(String qrKey) {
        this.qrKey = qrKey;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    @Basic
    @Column(name = "scan_type")
    public String getScanType() {
        return scanType;
    }

    public void setScanType(String scanType) {
        this.scanType = scanType;
    }

    @Basic
    @Column(name = "msg_id")
    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WxQrcodeScanDetailEntity that = (WxQrcodeScanDetailEntity) o;

        if (qrType != null ? !qrType.equals(that.qrType) : that.qrType != null) return false;
        if (qrKey != null ? !qrKey.equals(that.qrKey) : that.qrKey != null) return false;
        if (openid != null ? !openid.equals(that.openid) : that.openid != null) return false;
        if (scanType != null ? !scanType.equals(that.scanType) : that.scanType != null) return false;
        return msgId != null ? msgId.equals(that.msgId) : that.msgId == null;
    }

    @Override
    public int hashCode() {
        int result = qrType != null ? qrType.hashCode() : 0;
        result = 31 * result + (qrKey != null ? qrKey.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (scanType != null ? scanType.hashCode() : 0);
        result = 31 * result + (msgId != null ? msgId.hashCode() : 0);
        return result;
    }
}
